import http from '@/utils/http';

export function getAllDish() {
  return http.get('/dish/getAllDish')
}
export function getDishByIds(ids) {
  return http.get('/dish/getDishByIds',{
    params:{
      ids
    }
  })
}

export function getList(page,pageSize,name,categoryId,status) {
  return http.get('/dish/list',{
    params:{
        page,
        pageSize,
        name,
        categoryId,
        status
    }
  })
}

export function deleteDish(id) {
    return http.delete(`/dish/delete/${id}`) 
}

export function addDish(data) {
    return http.post('/dish/add',data)
}     

export function updateDish(data) {
  return http.put('/dish/update',data)
}     
